﻿using System;
using Castle.ActiveRecord;
using CosyTrade.Data;

namespace CosyTrade.Futures
{
    [AddPropertyChangedNotifyInterface, PropertyChangedNotify]
    [ActiveRecord("tbDelayPay"),Serializable]
    public class DelayPay : BusinessObject 
    {
        private readonly Guid primaryKey = Guid.NewGuid();
        [PrimaryKey(PrimaryKeyType.Assigned, "ROWGUID", Access = PropertyAccess.NosetterCamelcase)]
        public override Guid PrimaryKey
        {
            get { return primaryKey; }
        }
        
        /// <summary>
        /// 支付期限
        /// </summary>
        private DateTime payLimitDate =DateTime.Now.AddMonths(1);
        /// <summary>
        /// 滞纳金
        /// </summary>
        private double zhinajing;
        /// <summary>
        /// 滞纳金计算百分比
        /// </summary>
        private int delayPercent;
        /// <summary>
        /// 每隔几多天为一期，加收滞纳金,
        /// </summary>
        private int daylimit;

        /// <summary>
        /// 
        /// </summary>
        private DateTime payTime = DateTime.Now;

        /// <summary>
        /// 上次累加日期
        /// </summary>
        private DateTime prvAddDate = DateTime.Now;

        private Guid orderGuid;

        /// <summary>
        /// 支付期限
        /// </summary>
        [Property]
        public DateTime PayLimitDate
        {
            get { return payLimitDate; }
            set { payLimitDate = value; }
        }

        /// <summary>
        /// 滞纳金
        /// </summary>
        [Property]
        public double Zhinajing
        {
            get { return zhinajing; }
            set { zhinajing = value; }
        }

        /// <summary>
        /// 滞纳金计算百分比
        /// </summary>
        [Property]
        public int DelayPercent
        {
            get { return delayPercent; }
            set { delayPercent = value; }
        }

        /// <summary>
        /// 每隔几多天为一期，加收滞纳金,
        /// </summary>
        [Property]
        public int Daylimit
        {
            get { return daylimit; }
            set { daylimit = value; }
        }

        /// <summary>
        /// 滞纳金累加日期
        /// </summary>
        [Property]
        public DateTime PayTime
        {
            get { return payTime; }
            set { payTime = value; }
        }

        /// <summary>
        /// 上次累加日期
        /// </summary>
        [Property]
        public DateTime PrvAddDate
        {
            get { return prvAddDate; }
            set { prvAddDate = value; }
        }

        [Property]
        public Guid OrderGuid
        {
            get { return orderGuid; }
            set { orderGuid = value; }
        }
    }
}
